/*
*Copyright (c) Nikhil Jain.
*Project ICARUS, communications and 
*artificial intelligence.
*/



/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
 */
package javadrone.agent;

//~--- non-JDK imports --------------------------------------------------------

import javadrone.agent.demo.ExtendedAgentDemo;

import simbad.gui.Simbad;

//~--- JDK imports ------------------------------------------------------------

import javax.swing.JOptionPane;

/**
 *
 * @author Nikzzay
 */
public class DemoSimulator {
    public static void main(String[] args) {

        // process options
        boolean backgroundMode = false;

        for (int i = 0; i < args.length; i++) {
            if ("-bg".compareTo(args[i]) == 0) {
                backgroundMode = true;
            }
        }

        // Check java3d presence
        try {
            Class.forName("javax.media.j3d.VirtualUniverse");
        } catch (ClassNotFoundException e1) {
            JOptionPane.showMessageDialog(null, "Simbad requires Java 3D", "Simbad 3D", JOptionPane.ERROR_MESSAGE);
            System.exit(-1);
        }

        // request antialising
        System.setProperty("j3d.implicitAntialiasing", "true");
        new Simbad(new ExtendedAgentDemo(), backgroundMode);
    }
}


//~ Formatted by Jindent --- http://www.jindent.com
